﻿<%@ Page Language="C#" MasterPageFile="~/Themes/Fantasy/Views/Shared/Site.Master"  Inherits="System.Web.Mvc.ViewPage" %>

<%@ Import Namespace="AFDS.BusinessLogic" %>
<%@ Import Namespace="AFDS.Core" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<% Html.RenderPartial("AFDSSubMenu");%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">    
<% var settings = (ViewData["Settings"] as Hashtable); %>
<fieldset class="MvcMembership">
<% Html.BeginForm("Settings", "AFDSAdmin"); %>
	<legend><h1><%=ViewData["Title"] %></h1></legend><br />
	<table width="100%" cellspacing=2>
	    <tr>
	        <td>Directory Name:</td><td><%=settings["DirectoryName"]%></td>
	    </tr>
	    <tr>
	        <td>Storage:</td><td><%=settings["Storage"]%></td>
	    </tr>
	    <tr>
	        <td>Theme:</td><td><input id="Theme" title="edit" name="Theme" value=<%=settings["Theme"]%> disabled /></td>
	    </tr>
	    <tr>
	        <td>Root Category:</td><td>	        
	        <%
	         using (AFDS.BusinessLogic.Helpers.CategoryHelper cHelper = new AFDS.BusinessLogic.Helpers.CategoryHelper()){                    
                    try{
                        Guid id = new Guid(settings["Rootcategory"].ToString());                        
                        Response.Write(cHelper.GetCategoryByID(id).Name);
                    }
                    catch{
                        Response.Write("null");
                    }
             }             
            %>	        
	        </td>
	        <td>
	            <input type="submit" title="Edit" onclick="box(); return false;" value="edit" /> 	            
	        </td>
	    </tr>    	    	    	    
	</table>	
</fieldset>
<% Html.EndForm(); %>
</asp:Content>

